/**
 * @description 班次管理
 * @author qiankui 2024-2-19 13:50:29
 **/

import request from '@/assets/common/js/utils/request';

/**
 * @description 获取班次列表
 * @param not
 * @return not
 * @author qiankui 2024-2-19 13:51:22
 **/
export function workingscheduleGetlist(data) {
    return request({
        url: 'workingschedule/getlist',
        method: 'post',
        data: data,
    });
}
/**
 * @description 新建班次
 * @param not
 * @return not
 * @author qiankui 2024-2-20 09:43:43
 **/
export function workingscheduleCreate(data) {
    return request({
        url: 'workingschedule/create',
        method: 'post',
        data: data,
    });
}
/**
 * @description 设置和取消默认班次
 * @param not
 * @return not
 * @author qiankui 2024-2-19 14:40:36
 **/
export function workingscheduleSetdefault(data) {
    var  form = new FormData();
    // form.append("api-version",1)
    form.append("id",data.id)
    form.append("isDefualt",data.isDefualt)
    return request({
        url: 'workingschedule/setdefault',
        method: 'post',
        data: form,
    });
}
/**
 * @description 删除班次
 * @param not
 * @return not
 * @author qiankui 2024-2-20 09:42:07
 **/
export function workingscheduleDelete(id) {
    return request({
        url: `workingschedule/delete?id=${id}`,
        method: 'DELETE',
    });
}
/**
 * @description 更新班次
 * @param not
 * @return not
 * @author qiankui 2024-2-20 14:22:53
 **/
export function workingscheduleUpdate(data) {
    return request({
        url: `workingschedule/update/${data.id}`,
        method: 'put',
        data: data,
    });
}
/**
 * @description 查询默认班次
 * @param not
 * @return not
 * @author qiankui 2024-5-14 19:40:37
 **/
export function workingscheduleGetdefault() {
    return request({
        url: 'workingschedule/getdefault',
        method: 'get'
    });
}
